package com.jt.demo7_di;

import org.springframework.stereotype.Component;

import java.sql.SQLOutput;

public class Person {
    //定义属性
    private Integer id;
    private String name;

    //为属性赋值,必须有set方法!!!!!!!
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public void sayHi(){
        System.out.println("你好:"+id+":"+name);
    }
}
